package com.sun.tspalgorithm.util;

import com.sun.tspalgorithm.entity.City;

public class DistanceUtil {


    public static Double getDistance(City a, City b) {
        //欧式距离求解两个坐标间距离
        return Math.sqrt(Math.pow((a.getX() - b.getX()), 2) + Math.pow((a.getY() - b.getY()), 2));
    }


}
